package reflect;


import reflect.annotations.AutoRunClass;

/**
 * 使用反射机制访问注解
 */
public class ReflectDemo6 {
    public static void main(String[] args) {
        Class c = null;
        try {
//            c = Class.forName("reflect.Person");
            c = Class.forName("reflect.ReflectDemo6");
        } catch (Exception e) {
            e.printStackTrace();
        }

        boolean result = c.isAnnotationPresent(AutoRunClass.class);
        System.out.println(result);
    }
}
